package com.lxy.aimin.admin.controller.drug;


import com.lxy.aimin.admin.feign.DrugFeignClient;
import com.lxy.aimin.base.response.Result;
import lombok.RequiredArgsConstructor;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/public/drug")
@RequiredArgsConstructor
public class DrugController {

    private final DrugFeignClient drugFeignClient;

    @Cacheable(value = "drugList", key = "'drugList'")
    @RequestMapping("/list")
    public Result<?> list(){
        return drugFeignClient.list();
    }
}
